import Cookie from "js-cookie";
const noteBase = {
    datetime:"",
    noteContent:"",
    noteId:"",
    noteImg:[],
    vx:"",
}
const state = {
    sexType:"",
    verificationCodeStatus:false,
    note:{
        ...noteBase
    }
}

const mutations = {
    setSexType:(state,payload) => {
        state.sexType = payload;
    },
    setVerificationCodeStatus:(state, payload) => {
        state.verificationCodeStatus = payload;
    },
    setNote:(state,payload) => {
        state.note = payload;
    },
    clearNote:(state) => {
        state.note = noteBase;
    }
}

const getters = {
    getSexType:state => {
        return state.sexType;
    },
    getVerificationCodeStatus: state=> {
        return state.verificationCodeStatus;
    },
    getNote:state => {
        return state.note;
    }
}

const actions = {}

export default {
    state,
    mutations,
    actions,
    getters
}
